﻿using ChuanYe.WorkLogManagement.EF.SqlServer;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace ChuanYe.WorkLogManagement.BLL
{
    public class TestBLL
    {
        #region 构造单例
        private TestBLL() { }
        private static TestBLL _instance;
        public static TestBLL Instance
        {
            get
            {
                return _instance ?? (_instance = new TestBLL());
            }
        }
        #endregion

        public void InitDatabseSystem() {
            using (WorkLogContext context = new WorkLogContext())
            {
                context.Database.EnsureCreated();
                context.SaveChanges();
            }
        }
        
    }
}
